{# Héritage du layout princaple appliqué aux pages de gestion des articles #}
{% extends "BlissUserBundle:User:layout.html.twig" %}
{% block body %}
<section id="largeTable" class="column">
    <article class="module width_3_quarter">
        <form action="{{ path('user') }}" method="post">
            <header><h3 class="tabs_involved">Liste des Utilisateurs</h3>
                <ul class="tabs">
                    <button name="action" value="remove" onclick="return confirm('Etes vous sûre de vouloir supprimer la sélection ?')" class="btn btn-primary btn-remove"><i class="icon-white icon-trash"></i> Supprimer la sélection</a></button>
                    <a href="{{ path('user_new') }}" class="btn btn-primary btn-new"><i class="icon-white icon-plus"></i> Ajouter</a>
                </ul>
            </header>

            <div class="tab_container">
                <div id="tab1" class="tab_content tablesorter" style="display: block;">
                    <table class="tablesorter" id="tableBackOffice" cellspacing="0">
                        <thead>
                            <tr>
                                <td><input type="checkbox"></td>
                                <th class="header">Id</th>
                                <th class="header">Nom d'utilisateur</th>
                                <th class="header">Nom</th>
                                <th class="header">Prénom</th>
                                <th class="header">Role</th>
                                <th class="header">Actions</th>
                            </tr> 
                        </thead>
                        <tbody>
                                {% for entity in entities %}
                                <tr>
                                    <td><input type="checkbox" name="multiSelect[]" value="{{ entity.id }}"></td>
                                    <td>{{ entity.id }}</td>
                                    <td>{{ entity.login }}</td>
                                    <td>{{ entity.nom }}</td>
                                    <td>{{ entity.prenom }}</td>
                                    <td>{{ entity.role }}</td>
                                    <td>
                                        <a href="{{ path('user_show', { 'id': entity.id }) }}" title="Consulter" class="icon-eye-open icon-large"></a>
                                        <a href="{{ path('user_edit', { 'id': entity.id }) }}" title="Modifier" class="icon-pencil icon-large"></a>
                                    </td>
                                </tr>
                                {% endfor %}
                            </tbody>
                        </table>
                        <ul class="tabs">
                            <button name="action" value="remove" onclick="return confirm('Etes vous sûre de vouloir supprimer la sélection ?')" class="btn btn-primary btn-remove"><i class="icon-white icon-trash"></i> Supprimer la sélection</a></button>
                        </ul>
                    </div><!-- end of #tab2 -->
                </div>
            </form>
        </article>
    </section>
{% endblock %}